﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using Tools;
using System.Data;

namespace ThanhNienSite
{
    public class TblUserManager
    {
        public static TblUserManager CreateInstant()
        {
            return new TblUserManager();
        }

        public int InsertUpdate(int UserId, string Name, string Email)
        {
            List<SqlParameter> ls = new List<SqlParameter>();

            ls.Add(new SqlParameter("@UserId", UserId));
            ls.Add(new SqlParameter("@Name", Name));
            ls.Add(new SqlParameter("@Email", Email));
            SqlParameter[] sqlparam = ls.ToArray();
            SqlHelper.ExecuteNonQuery(SqlHelper.WpConnectString, CommandType.StoredProcedure, "wp_InsertUpdateTblUser", sqlparam);
            return int.Parse(sqlparam[0].Value.ToString());
        }
    }


}